Repository navigation
固定 Objective-C 与 Solidity 语法候选资产 - #20
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5e5506a464
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if matches!(asset.language.as_str(), "objc" | "solidity") { | ||
| let source = if asset.language == "objc" { | ||
| include_bytes!("../../../grammars/objc/source.wasm").as_slice() | ||
| } else { | ||
| include_bytes!("../../../grammars/solidity/source.wasm").as_slice() |
There was a problem hiding this comment.
Keep raw grammar sources out of default CLI binaries
In builds without wasm-precheck, grammar status still calls bundled_grammar_candidates, so these unconditional include_bytes! references keep both the source and adapted Objective-C/Solidity modules reachable in the normal CLI. The four files total about 15.5 MiB, meaning this ostensibly optional worker change substantially enlarges every default/native npm binary even though those builds cannot invoke __syntax-worker; gate the byte-level adaptation verification behind the feature or move it to build/test-time validation.
Useful? React with 👍 / 👎.
| #[test] | ||
| fn dependency_grammars_load_offline_and_parse_basic_fixtures() { |
There was a problem hiding this comment.
Run the gated runtime grammar test in CI
This new test is disabled unless codeguard-runtime/wasm-precheck is active, but the feature-enabled runtime command in .github/workflows/ci.yml runs only --test process_contract, while the later workspace command enables no features. Cargo's local test --help defines --test [<NAME>] as “Test only the specified test target” and --features as activating the named features, so wasm_grammar_load never runs in the checked CI pipeline and regressions in these direct load/invalid-fixture assertions can merge unnoticed; include this test target in the feature-enabled step.
Useful? React with 👍 / 👎.
问题与结果
CodeGraph 的 Objective-C 与 Solidity grammar 来自锁定的
tree-sitter-wasms@0.1.13,此前 CodeGuard 只报告其来源但未固定字节,无法在 Rust worker 中加载。现在保留原始 WASM、许可证和摘要,并将旧dylink元数据确定性转换为当前 Rust Tree-sitter 可识别的dylink.0。两种语言已能执行隔离 worker 候选观察;即使无恢复节点,结果仍为incomplete,不会跳过原生 lint 或批准交付。候选资产由 5 增至 7;32 种目标语言中仍有 25 种没有候选资产,已验收发行能力仍为 0。OpenSpec、双语架构/技术文档及 README 已同步这一边界。
验证
cargo test --locked --workspace --all-features:退出 0;需要显式本地原生工具的测试仍按原条件忽略。cargo clippy --locked --workspace --all-targets --all-features -- -D warnings:退出 0。cargo fmt --all -- --check:退出 0。openspec validate introduce-rust-codeguard-cli --strict:通过。完整语料、版本/方言、原生工具对照、公开 lint 路由及发行包安装仍未验收,14.19 保持未完成。